<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.education.domain.RegisterUser"%>
<div class="row-fluid">
	<ul class="breadcrumb">
		<%
			RegisterUser user = (RegisterUser)request.getSession().getAttribute("user");
			if(null == user){
		 %>
		<li>
			账号:<input type="text" id="loginName" name="loginName" value="" /> &nbsp;密码：<input type="password" name="passwd" id="passwd" />
			<a href="#" onclick="login();">登录</a> 
			&nbsp;&nbsp;
		</li>
		<%}else{  %>
			当前用户：<%=user.getLoginName() %> (<%=user.getTrueName() %> )
			<a href="${basePath }index/logout">退出</a>
		<%} %>
		<li>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="${basePath }login">后台管理入口</a>
		</li>
	</ul>
</div>
<script>
	function login(){
		var loginName=document.getElementById("loginName").value;
		var passwd=document.getElementById("passwd").value;
		if(loginName != ""){
			window.location="${basePath}index/login/" + loginName + "/" + passwd;
		}else{
			alert("登录账号不能为空");
		}
	}
</script>